<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>首页</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="apple-touch-fullscreen" content="yes">
    <meta name="full-screen" content="yes">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="white">
    <meta name="format-detection" content="telephone=no"/>
    <meta name="format-detection" content="address=no">
    <script src="../../js/jquery-2.1.1.min.js"></script>
    <script type="text/javascript">
        var docEl = document.documentElement;
        var clientWidth = docEl.clientWidth;
        docEl.style.fontSize = (clientWidth / 10) + 'px';
        $(document).ready(function () {
            (function (doc, win) {
                var docEl = doc.documentElement,
                        resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
                        recalc = function () {
                            var clientWidth = docEl.clientWidth;
                            docEl.style.fontSize = (clientWidth / 10) + 'px';
                        };

                if (!doc.addEventListener) return;
                win.addEventListener(resizeEvt, recalc, false);
                doc.addEventListener('DOMContentLoaded', recalc, false);
            })(document, window);
        });
    </script>
    <link rel="stylesheet" href="../../style/css/mui.css"/>
    <link rel="stylesheet" href="../../style/css/swiper.min.css">
    <link rel="stylesheet" href="../../style/css/index.css"/>
</head>
<body>
<div style="background: #f7f7f7;width: 100%;height: 100%">
    <!--header-->
    <div class="header" style="background: #ffcd00;">
        <div class="choosePlace">
            <a href="difang.html" style="color:#333;">
                杭州
                <img class="rightS" src="../../style/images/qgh_ic_dizhi.png" alt=""/>
            </a>
        </div>
        <a href="search.html">
            <img class="search" src="../../style/images/qgh_ic_sousuo.png" alt=""/>
        </a>
    </div>
    <!-- content-->
    <div class="banner">
        <div class="swiper-container">
            <div class="swiper-wrapper" id="swiper-wrapper">
                <!--<div class="swiper-slide"><img src="../../updata/banner.jpg" alt=""/></div>-->
                <!--<div class="swiper-slide">2</div>-->
            </div>
            <!-- Add Pagination -->
            <div class="swiper-pagination"></div>
        </div>
    </div>


    <ul class="differentWay">
        <li>
            <a href="tour.html">
                <img src="../../style/images/sg_ic_apt.png" alt=""/>

                <p>爱团拼</p>
            </a>
        </li>
        <li>
            <a href="detailsPy.html">
                <img src="../../style/images/sg_ic_jpy.png" alt=""/>

                <p>捡便宜</p>
            </a>
        </li>
        <li>
            <a href="kanjia.html">
                <img src="../../style/images/sg_ic_tms.png" alt=""/>

                <p>去砍价</p>
            </a>
        </li>
        <li>
            <a href="appraise.html">
                <img src="../../style/images/sg_ic_qkj.png" alt=""/>

                <p>她们说</p>
            </a>
        </li>
    </ul>

    <div class="tuanP">
        <div class="title">
            <p class="p1"><span>爱团拼</span><img src="../../style/images/sg_img_apt@2x.png" alt=""/></p>

            <p class="p2">团购更优惠</p>
        </div>
        <div id="tuanP">
        </div>
        <div class="clear"></div>
    </div>
    <div class="tuanP">
        <div class="title">
            <p class="p1"><span>大家都在抢</span><img src="../../style/images/sg_img_qianggou@2x.png" alt=""/></p>

            <p class="p2">下手晚就没了</p>
        </div>
        <div class="clear"></div>
    </div>
    <ul class="qiangt" id="qiangt">
    </ul>
    <div style="clear: both; width: 100%;height: 50px;"></div>
</div>
<!--footer-->
<footer>
    <ul class="footer_tool">
        <li>
            <a href="index.html">
                <img src="../../style/images/sg_tab_shouye_n.png" alt=""/>

                <p>首页</p>
            </a>
        </li>
        <li>
            <a href="../myGroup/shopingCart.html">
                <img src="../../style/images/sg_tab_gouwuche_n.png" alt=""/>

                <p>购物车</p>
            </a>
        </li>
        <li>
            <a href="../user/user.html">
                <img src="../../style/images/sg_tab_wode_n.png" alt=""/>

                <p>我的</p>
            </a>
        </li>
    </ul>
</footer>
<script src="../../js/jquery-2.1.1.min.js"></script>
<script src="../../js/mui.min.js"></script>
<script src="../../js/swiper.min.js"></script>
<script src="../../js/md5.js"></script>
<script src="../../js/md5_need.js"></script>
<script type="text/javascript" charset="utf-8">
    $(document).ready(function () {
        var indexJs = {
            getBanner: function () {
                var data = {
                    apiCode: '_active_index_001'
                };
                http(data, function (responed) {
                    console.log(responed);
                    var $info = responed.info;
                    $.each($info, function (i, n) {
                        var temp = "";
                        temp += '<div class="swiper-slide"><a href="details.html?id='+ n.target_url +'"><img src="  ' + n.img_url + '  " alt=""/></a></div>';
                        $("#swiper-wrapper").append(temp);
                        var swiper = new Swiper('.swiper-container', {
                            pagination: '.swiper-pagination',
                            paginationClickable: true,
                            spaceBetween: 0,
                            centeredSlides: true,
                            autoplay: 2500,
                            autoplayDisableOnInteraction: false
                        });
                    });
                })
            },
            getTuan: function () {
                var data = {
                    apiCode: '_index_group_goods_001'
                };
                http(data, function (responed) {
                    console.log(responed);
                    var $info = responed.info;
                    var temp = "";
                    $.each($info, function (i, n) {
                        temp += '<div class="tp_picShow">';
                        temp += '<a href="details.html?id=' + n.id + '"><img class="food_picShow" src="' + n.img_path + '" alt=""/></a>';
                        temp += '<p class="food_title">' + n.title + '</p>';
                        temp += '<p class="food_int">' + n.sub_title + '</p>';
                        temp += '<div style="margin-bottom: 15px;    height: 36px;">';
                        temp += '<span class="price">￥' + n.discount_price + '</span>';
                        temp += '<a href="details.html?id=' + n.id + '">';
                        temp += '<div class="fr psPhone">';
                        if (n.status == 1) {
                            temp += '去拼团';
                        } else {
                            temp += '超级拼团';
                        }
                        temp += '<img src="../../style/images/serch_del_into_4.png" alt=""/>';
                        temp += '</div>';
                        temp += '</a>';
                        temp += '</div>';
                        temp += '</div>';
                    });
                    $("#tuanP").append(temp);
                })
            },
            getQiang: function () {
                var data = {
                    apiCode: '_goods_001'
                };
                http(data, function (responed) {
                    console.log(responed);
                    var $info = responed.info;
                    $.each($info, function (i, n) {
                        var temp = "";
                        temp += '<li>';
                        temp += '<a href="details.html?id=' + n.id + '"><img class="foodImg1" src="' + n.img_path + '" alt=""/></a>';
                        temp += '<p class="price">￥' + n.discount_price + '</p>';
                        temp += '<p style="font-size:12px;">' + n.sub_title + '</p>';
                        temp += '</li>';
                        $("#qiangt").append(temp);
                    });
                })
            }
        };
        indexJs.getBanner();
        indexJs.getTuan();
        indexJs.getQiang();
    });


</script>
</body>
</html>